<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="__PUBLIC__/Admin/images/Admin_css.css" type="text/css" rel="stylesheet">
<link rel="shortcut icon" href="__PUBLIC__/Admin/images/myfav.ico" type="image/x-icon" />
<style> 
.clear{ clear:both; float:none;}
.content{margin-bottom:15px;}
.pyimgbox{ padding:15px 10px 10px;zoom:1;}
#pyimglist li{ float:left; width:166px; height:180px; margin:5px 10px; _display:inline;  text-align:center; list-style-type:none;}
#pyimglist li img{ width:160px; height:120px; margin-bottom:5px;*margin-bottom:7px; padding:2px; background:#fff; border:1px solid #e3e3e3;}
#pyimglist li a{ line-height:18px;}
</style>
<import file= "Admin.js.admin,Admin.js.Ajax,Admin.js.Jquery"/> 
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/jquery.artDialog.js?skin=green"></script>
<script charset="utf-8" src="__PUBLIC__/Common/artDialog/extend.js"></script>
<script>
artDialog.setdefault = function (name,sql,plugin,url) {
    
    return artDialog({
		title:'设置 '+name+' 主题为默认WAP主题',
        id: 'setdefault',
        fixed: true,
        lock: true,
        opacity: .1,
        content: [
            '<div style="margin-bottom:5px;font-size:12px" id="art_content">',
                '附加安装选项',
            '</div>',
            '<div>',
                '演示数据: <input type="checkbox"  name="art_demo" id="art_demo" ',sql,'/>&nbsp;&nbsp;依赖插件: <input type="checkbox"  name="art_plugin" id="art_plugin" ',plugin,'/>&nbsp;&nbsp;数据备份: <input type="checkbox"  name="art_backup" id="art_backup"/><br/>',
				'<div style="margin-bottom:5px;margin-top:5px;font-size:12px">安装演示数据将替换现有数据库内容,不可恢复,请提前备份数据库!</div>',
            '</div>',
            ].join(''),
        init: function () {
		
        },
        ok: function (here) {
			if($('#art_demo').attr('checked')=='checked') url = url + '&demo=1';
			if($('#art_backup').attr('checked')=='checked') url = url + '&backup=1';
			if($('#art_plugin').attr('checked')=='checked') url = url + '&plugin=1';
			window.location.href=url;
        },
        cancel: true
    });
};
function jconfirm(str,sql,plugin,url)
{
   artDialog.setdefault(str,sql,plugin,url);
}
function jconfirm2(str,url)
{
   $.dialog.confirm(str,function (){window.location.href=url;});
}
</script>
<title>WAP主题管理</title>
</head>
<body>
<table border="0" align="center" cellpadding="3" cellspacing="2" bgcolor="#FFFFFF" class="admintable">
  <tr>
    <td colspan="4" class="admintitle"><span style="float:right;">[<a href="{:U('Wap/import')}">导入WAP主题</a>]</span>默认WAP主题</td>
  </tr>
</table>
<div class="content">
	<div class='pyimgbox'>
		<ul id='pyimglist'>
		<li><a href="__ROOT__/index.php?mode=wap" target='_blank'><img src="<present name="defaultlist.thumb">{$defaultlist.thumb}<else/>__PUBLIC__/Admin/images/nopic.png</present>"/></a><p>WAP主题名称:{$defaultlist.name}</p>
		<p><a href="{:U('FileManage/index?dir=')}%2FPublic%2FWap%2F{$defaultlist.name}">模板</a>&nbsp;<a href="{:U('Wap/edit?name=')}{$defaultlist.name}">属性</a>&nbsp;<a href="javascript:;" onClick="JavaScript:return jconfirm2('将清空前台缓存,确定?','{:U('Wap/clear')}')">缓存</a>&nbsp;<a href="{:U('Wap/download?name=')}{$defaultlist.name}">导出</a></p></li>
		</ul>
	</div>
	<div class='clear'></div>
</div>
<table border="0" align="center" cellpadding="3" cellspacing="2" bgcolor="#FFFFFF" class="admintable">
  <tr>
    <td colspan="4" class="admintitle"><span style="float:right;cursor:pointer;"><img src="__PUBLIC__/Admin/images/add.gif" alt='主题市场' onclick="window.location.href='{:U('Market/theme')}'"/></span>可用WAP主题</td>
  </tr>
</table>
<div class="content">
	<div class='pyimgbox'>
		<ul id='pyimglist'>
		<volist name="list" id="vo">
		<li><a href="javascript:;" onclick="jconfirm('{$vo.name}','{$vo.sql}','{$vo.plugin}','{:U('Wap/setdefault?name=')}{$vo.name}')"><img src="<present name="vo.thumb">{$vo.thumb}<else/>__PUBLIC__/Admin/images/nopic.png</present>" alt='设为默认'/></a><p>WAP主题名称:{$vo.name}</p><p><a href="{:U('FileManage/index?dir=')}%2FPublic%2FWap%2F{$vo.name}">模板</a>&nbsp;<a href="{:U('Wap/edit?name=')}{$vo.name}">属性</a>&nbsp;<a href="javascript:;" onClick="JavaScript:return jconfirm2('确定要删除？不可恢复哦~','{:U('Wap/del?name=')}{$vo.name}')">删除</a>&nbsp;<a href="{:U('Wap/download?name=')}{$vo.name}">导出</a></p></li>
		</volist>
		</ul>
	</div>
	<div class='clear'></div>
</div>
<div style="text-align:center;margin:10px;">
<hr>
<include file="Index:copy" /> 
</div>
</body>
</html>